import request from '@/utils/request'

// 查询基金评估模板列表
export function listBfEvaluationDetail(query) {
  return request({
    url: '/bf/bfEvaluationDetail/list',
    method: 'get',
    params: query
  })
}

// 获取所有指标
export function getAllData(query) {
  return request({
    url: '/bf/bfEvaluationDetail/getAllData',
    method: 'get',
    params: query
  })
}

// 查询基金评估模板详细
export function getBfEvaluationDetail(id) {
  return request({
    url: '/bf/bfEvaluationDetail/' + id,
    method: 'get'
  })
}

// 查询基金评估雷达图数据
export function getEchartsData(query) {
  return request({
    url: '/bf/bfEvaluationDetail/getEchartsData',
    method: 'get',
    params: query
  })
}

// 保存基金评估模板
export function saveBfEvaluationDetail(data) {
  return request({
    url: '/bf/bfEvaluationDetail/save',
    method: 'post',
    data: data
  })
}

// 删除基金评估模板
export function delBfEvaluationDetail(id) {
  return request({
    url: '/bf/bfEvaluationDetail/' + id,
    method: 'delete'
  })
}

// 批量排序
export function updateSort(data) {
  return request({
    url: '/bf/bfEvaluationDetail/updateSort',
    method: 'post',
    data: data
  })
}

// 保存评分
export function submitScore(data) {
  return request({
    url: '/bf/bfEvaluationDetail/submitScore',
    method: 'post',
    data: data
  })
}
// 计算评分
export function autoScore(query) {
  return request({
    url: '/bf/bfEvaluationDetail/autoCalc',
    method: 'GET',
    params: query
  })
}

// 删除评分规则
export function delBfEvaluationDetailRule(id) {
  return request({
    url: '/rule/bfEvaluationDetailRule/' + id,
    method: 'delete'
  })
}
